package com.yun.blog.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yun.blog.bean.Tag;
import com.yun.blog.dao.TagMapper;
import com.yun.blog.service.TagService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class TagServiceImpl
        extends ServiceImpl<TagMapper, Tag>
        implements TagService {

    @Resource
    TagMapper tagMapper;

    @Override
    public Tag getByTagName(String tagName) {
        return tagMapper.getByTagName(tagName);
    }

    @Override
    public Tag getByTagId(Integer tagId) {
        return tagMapper.getByTagId(tagId);
    }

    @Override
    public List<Tag> getByBlogId(Integer blogId) {
        return tagMapper.getByBlogId(blogId);
    }

    @Override
    public List<Tag> listByIsUse(Boolean isUse) {
        return tagMapper.listByIsUse(isUse);
    }
}
